]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network: Remove superfluous intermediate section
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 7 Jun 2013 17:23:57 +0000 (13:23 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 13 Aug 2013 10:50:24 +0000 (06:50 -0400)
Now that we're guaranteed this.menu is a section, this is
excessive and unnecessary.

https://bugzilla.gnome.org/show_bug.cgi?id=705845

js/ui/status/network.js

index 9c03eeb7c5e7455b6a3ace6c725127b93e8021ae..9be93b1507ecedf20f123ef20733dfd02dcfa80c 100644 (file)
@@ -1204,25 +1204,22 @@ const NMApplet = new Lang.Class({
         this._nmDevices = [];
         this._devices = { };
 
-        this._section = new PopupMenu.PopupMenuSection();
-        this.menu.addMenuItem(this._section);
-
         this._devices.wireless = {
             section: new PopupMenu.PopupMenuSection(),
             devices: [ ],
         };
-        this._section.addMenuItem(this._devices.wireless.section);
+        this.menu.addMenuItem(this._devices.wireless.section);
 
         this._devices.wwan = {
             section: new PopupMenu.PopupMenuSection(),
             devices: [ ],
         };
-        this._section.addMenuItem(this._devices.wwan.section);
+        this.menu.addMenuItem(this._devices.wwan.section);
 
         this._vpnSection = new NMVPNSection(this._client);
         this._vpnSection.connect('activation-failed', Lang.bind(this, this._onActivationFailed));
         this._vpnSection.connect('icon-changed', Lang.bind(this, this._updateIcon));
-        this._section.addMenuItem(this._vpnSection.item);
+        this.menu.addMenuItem(this._vpnSection.item);
 
         this._readConnections();
         this._readDevices();
@@ -1242,7 +1239,7 @@ const NMApplet = new Lang.Class({
 
     _sessionUpdated: function() {
         let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
-        this._section.setSensitive(sensitive);
+        this.menu.setSensitive(sensitive);
     },
 
     _ensureSource: function() {
@@ -1583,7 +1580,7 @@ const NMApplet = new Lang.Class({
         this._syncActiveConnections();
 
         this.indicators.visible = this._client.manager_running;
-        this._section.actor.visible = this._client.networking_enabled;
+        this.menu.actor.visible = this._client.networking_enabled;
     },
 
     _updateIcon: function() {